

    <input type="hidden" name="nid" value="<? echo $detail['nid']?>">


    <div class="layui-form-item icon">
        <label class="layui-form-label">头像</label>
        <div class="layui-input-block">
        <img src="/uploadfiles/member/<? echo $detail['icon'] ?>" width="100"/>
        </div>
    </div>

    <div class="layui-form-item icon">
        <label class="layui-form-label">上传文件</label>
        <div class="layui-input-block">
            <input type="file" name="icon" onchange="fileChange(this);"/>
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">姓名</label>
        <div class="layui-input-block">
            <input type="text" name="ai_name" required  lay-verify="required" placeholder="请输入名字" autocomplete="off" class="layui-input" value="<? echo $detail['name']?>">
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">微信</label>
        <div class="layui-input-block">
            <input type="text" name="ai_weixin"   autocomplete="off" class="layui-input"  value="<? echo $detail['weixin']?>">
        </div>
    </div>

    <div class="layui-form-item">        
    <label class="layui-form-label">邮箱</label>
     <div class="layui-input-block">
                 <input type="text" name="ai_email"   autocomplete="off" class="layui-input"  value="<? echo $detail['email']?>">
		         </div>
			     </div>
			     
			     
			     
			     
			     
			     
			     
			     <div class="layui-form-item">
			             <label class="layui-form-label">国家/地区</label>
				             <div class="layui-input-block">
					                 <select name="ai_country" lay-search="" class="layui-input">
							                 <option value="<?echo $data['member']['country']?>"><?echo $data['member']['country']?></option>
									                 <?php
											                 // 假设 $allCountries 是一个数组，包含了所有国家的中文名称
													                 $allCountries = [
															                     "阿富汗", "阿兰岛", "阿尔巴尼亚", "阿尔及利亚", "美国", "安道尔", "安哥拉", "安圭拉", "南极洲",
																	                         "安提瓜和巴布达", "阿根廷", "亚美尼亚", "阿鲁巴", "澳大利亚", "奥地利", "阿塞拜疆", "巴哈马", "巴林",
                    "孟加拉国", "巴巴多斯", "白俄罗斯", "比利时", "伯利兹", "贝宁", "百慕大", "不丹", "玻利维亚", "波黑",
                    "博茨瓦纳", "布维岛", "巴西", "英属印度洋领地", "文莱", "保加利亚", "布基纳法索", "布隆迪", "柬埔寨",
                    "喀麦隆", "加拿大", "佛得角", "开曼群岛", "中非共和国", "乍得", "智利", "中国", "中国台湾", "中国香港", "圣诞岛", "科科斯群岛",
                    "哥伦比亚", "科摩罗", "刚果（布）", "刚果（金）", "库克群岛", "哥斯达黎加", "克罗地亚", "古巴", "塞浦路斯",
                    "捷克", "丹麦", "吉布提", "多米尼克", "多米尼加", "厄瓜多尔", "埃及", "萨尔瓦多", "赤道几内亚", "厄立特里亚",
                    "爱沙尼亚", "埃塞俄比亚", "福克兰群岛", "法罗群岛", "斐济", "芬兰", "法国", "法属圭亚那", "法属波利尼西亚",
                    "法属南部领地", "加蓬", "冈比亚", "格鲁吉亚", "德国", "加纳", "直布罗陀", "希腊", "格陵兰", "格林纳达",
                    "瓜德罗普", "关岛", "危地马拉", "几内亚", "几内亚比绍", "圭亚那", "海地", "赫德岛和麦克唐纳群岛", "梵蒂冈",
                    "洪都拉斯", "匈牙利", "冰岛", "印度", "印度尼西亚", "伊朗", "伊拉克", "爱尔兰", "以色列", "意大利",
                    "牙买加", "日本", "约旦", "哈萨克斯坦", "肯尼亚", "基里巴斯", "科威特", "吉尔吉斯斯坦", "老挝", "拉脱维亚",
                    "黎巴嫩", "莱索托", "利比里亚", "利比亚", "列支敦士登", "立陶宛", "卢森堡", "马达加斯加", "马拉维", "马来西亚",
                    "马尔代夫", "马里", "马耳他", "马提尼克", "毛里塔尼亚", "毛里求斯", "墨西哥", "密克罗尼西亚", "摩尔多瓦",
                    "摩纳哥", "蒙古", "黑山", "蒙特塞拉特", "摩洛哥", "莫桑比克", "缅甸", "纳米比亚", "瑙鲁", "尼泊尔",
                    "荷兰", "新喀里多尼亚", "新西兰", "尼加拉瓜", "尼日尔", "尼日利亚", "纽埃", "诺福克岛", "北马其顿", "挪威",
                    "阿曼", "巴基斯坦", "帕劳", "巴拿马", "巴布亚新几内亚", "巴拉圭", "秘鲁", "菲律宾", "皮特凯恩群岛", "波兰",
                    "葡萄牙", "波多黎各", "卡塔尔", "留尼汪", "罗马尼亚", "俄罗斯", "卢旺达", "圣巴泰勒米", "圣赫勒拿", "圣基茨和尼维斯",
                    "圣卢西亚", "圣马丁岛", "圣马力诺", "圣多美和普林西比", "沙特阿拉伯", "塞内加尔", "塞尔维亚", "塞舌尔",
                    "塞拉利昂", "新加坡", "圣皮埃尔和密克隆", "斯洛伐克", "斯洛文尼亚", "所罗门群岛", "索马里", "南非",
                    "南乔治亚岛和南桑威奇群岛", "韩国", "西班牙", "斯里兰卡", "圣马力诺", "圣马丁", "苏丹", "南苏丹",
                    "苏里南", "斯瓦尔巴和扬马延", "斯威士兰", "瑞典", "瑞士", "叙利亚", "塔吉克斯坦", "坦桑尼亚",
                    "泰国", "东帝汶", "多哥", "托克劳", "汤加", "特立尼达和多巴哥", "突尼斯", "土耳其", "土库曼斯坦", "特克斯和凯科斯群岛",
                    "图瓦卢", "乌干达", "乌克兰", "阿拉伯联合酋长国", "英国", "美国", "美属维尔京群岛", "乌拉圭", "乌兹别克斯坦",
                    "瓦努阿图", "梵蒂冈", "委内瑞拉", "越南", "英属维尔京群岛", "瓦利斯和富图纳", "西撒哈拉", "也门", "赞比亚",
                    "津巴布韦"
                ];

                foreach ($allCountries as $country) {
                    echo "<option value=\"$country\">$country</option>";
                }
                ?>
            </select>


        </div>
    </div>
    <?
    $unit_list=select_lines_all_items($table_Prefix."unit","nid desc","","0");
    $unit=select_one_line_all_items($table_Prefix."unit","nid = '".$detail['unit']."'");
    ?>

    <div class="layui-form-item">
        <label class="layui-form-label">所属单位</label>
        <div class="layui-input-block">
            <select name="ai_unit" lay-search="" >
                <option value="<? echo $detail['unit']?>"><? echo $detail['unit']." : ".$unit['name']?></option>
                <option value="">无</option>
                <? for($i=0;$i<count($unit_list);$i++){ ?>
                    <option value="<? echo $unit_list[$i]['nid'] ?>"><? echo $unit_list[$i]['nid'] ?> : <? echo $unit_list[$i]['name'] ?></option>
                <? } ?>
            </select>
        </div>
    </div>







    <div class="layui-form-item">
        <label class="layui-form-label">好感度</label>
        <div class="layui-input-block" >
            <input type="radio" name="ai_favourable"  value="友好"     title="友好"      <? if($detail['favourable']=="友好")   {echo "checked";} ?>>
            <input type="radio" name="ai_favourable"  value="互相仇恨"  title="互相仇恨"  <? if($detail['favourable']=="互相仇恨"){echo "checked";} ?>>
            <input type="radio" name="ai_favourable"  value="仇视我方"  title="仇视我方"  <? if($detail['favourable']=="仇视我方"){echo "checked";} ?>>
            <input type="radio" name="ai_favourable"  value="我方仇视"  title="我方仇视"  <? if($detail['favourable']=="我方仇视"){echo "checked";} ?>>
            <input type="radio" name="ai_favourable"  value="我方不满"  title="我方不满"  <? if($detail['favourable']=="我方不满"){echo "checked";} ?>>
            <input type="radio" name="ai_favourable"  value="不满我方"  title="不满我方"  <? if($detail['favourable']=="不满我方"){echo "checked";} ?>>
            <input type="radio" name="ai_favourable"  value="普通"     title="普通"      <? if($detail['favourable']=="普通")    {echo "checked";} ?>>
        </div>

    </div>



    <div class="layui-form-item">
        <label class="layui-form-label">标签</label>

        <div class="layui-input-block" >
            <?

            ;foreach ($tag_array as $k => $v){?>
                <input type="checkbox" name="ai_tag[]"  value="<?echo $v?>"     title="<?echo $v?>"
                    <? if(in_array($v,$now_member_tag_array))   {echo "checked";} ?>>
                <?;}?>

        </div>
    </div>


    <? $tag_list=select_lines_all_items($table_Prefix."option","nid desc","originate = 'member ' and type = 'tag' ","0"); ?>
    <? $relation_array=explode(",",$detail['relation']);?>
    <div class="layui-form-item">
        <label class="layui-form-label">角色</label>

        <div class="layui-input-block" >
            <? foreach ($tag_list as $k => $v){?>
                <input type="checkbox" name="ai_relation[]"  value="<?echo $v['name']?>"     title="<?echo $v['name']?>"
                    <? if(in_array($v['name'],$relation_array))   {echo "checked";} ?>>
                <?;}?>

        </div>
    </div>






        <div class="layui-form-item">
            <label class="layui-form-label">性别</label>
            <div class="layui-input-block">
                <input type="radio" name="ai_gender" value="男" title="男"
                    <? if($detail['sex']=="男"){echo "checked";} ?>
                >
                <input type="radio" name="ai_gender" value="女" title="女"
                    <? if($detail['sex']=="女"){echo "checked";} ?>
                >
            </div>
        </div>


        <div class="layui-form-item">
            <label class="layui-form-label">电话</label>
            <div class="layui-input-block">
                <input type="text" name="ai_phone" placeholder="请输入电话" autocomplete="off" class="layui-input" value="<? echo $detail['phone']?>">
            </div>
        </div>








        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">备注</label>
            <div class="layui-input-block">
                <textarea name="ai_remark" placeholder="备注" class="layui-textarea"><? echo $detail['remark']?></textarea>
            </div>
        </div>





        <input name="navitemed" type="hidden"  value="<? echo $_REQUEST['nav-itemed'] ?>"/>
        <input name="sys_part"  type="hidden"  value="<? echo $system_part ?>"/>
        <input name="nowpageid" type="hidden"  value="<? echo $_REQUEST['nowpageid'] ?>"/>
        <input name="sortby"    type="hidden"  value="<? echo $_REQUEST['sortby'] ?>"/>
        <input name="term_nid"  type="hidden"  value="<? echo $_REQUEST['term_nid'] ?>"/>







